# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=audacious-plugins
pkgver=4.4.1
pkgrel=0
pkgdesc="A playlist-oriented media player with multiple interfaces (plugins)"
url="https://audacious-media-player.org/"
arch="all !s390x"
license="BSD-2-Clause AND BSD-3-Clause AND ISC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later"
depends="audacious"
install_if="audacious"
makedepends="
	alsa-lib-dev
	audacious-dev
	autoconf
	automake
	curl-dev
	faad2-dev
	ffmpeg-dev
	flac-dev
	lame-dev
	libcddb-dev
	libcdio-dev
	libcdio-paranoia-dev
	libcue-dev
	libmms-dev
	libnotify-dev
	libogg-dev
	libopenmpt-dev
	libsamplerate-dev
	libsndfile-dev
	libvorbis-dev
	libxcomposite-dev
	libxml2-dev
	meson
	mpg123-dev
	neon-dev
	pulseaudio-dev
	sdl2-dev
	wavpack-dev
	"
subpackages="$pkgname-dbg $pkgname-lang"
source="http://distfiles.audacious-media-player.org/audacious-plugins-$pkgver.tar.bz2"
options="!check" # No test suite (or any plans for one)

build() {
	case "$CARCH" in
	arm*|aarch64)
		local qtgl=false
		;;
	*)
		local qtgl=true
		;;
	esac
	abuild-meson \
		-Db_lto=true \
		-Dgtk=false \
		-Dqt=true \
		-Dgl-spectrum=$qtgl \
		. output

	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
0c97b4c1ba635b53f416680de57b6b5921b8f0afcefa713129475c006585d53581e8f693f89e705284383ce2f3f6c3e01def8bce9ba1371a18bee7e007884389  audacious-plugins-4.4.1.tar.bz2
"
